<script lang="ts" setup>
import FormValidate from './views/FormValidate.vue';
import VModelDemo from './views/VModelDemo.vue';
import VModelCustomComp from './views/VModelCustomComp.vue';
import MyInputNumber from './components/MyinputNumber.vue';
import { ref } from 'vue';

const num = ref(0)

</script>

<template>
  <!-- 表单校验案例 -->
  <FormValidate v-if="false" />
  <!-- v-model原理 -->
  <VModelDemo v-if="false" />
  <!-- 自定义v-model -->
  <VModelCustomComp v-if="false" />
  <!-- 数字输入框 -->
  <h3>数字输入框</h3>
  <div>父组件的数量：{{ num }}</div>
  <!-- v-model:modelValue 可简写为 v-model -->
  <!-- <MyInputNumber v-model:modelValue="num" /> -->
  <MyInputNumber v-model="num" />
</template>